#pragma once
#define max_name 20
#define max_sex 10
#define max_tele 15
#define max_addr 20
#define max_data 100
#define max_cap 3
#define er 2
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
typedef struct sir
{
	char name[max_name];
	int age;
	char sex[max_sex];
	char tele[max_tele];
	char addr[max_addr];
}contract;
enum choice
{
	Exit,
	add,
	dele,
	mod,
	sort,
	show
};

//typedef struct abc
//{
//	contract data[max_data];
//	int sz;
//}tongxunlu;
typedef struct abc
{
	contract* data;
	int sz;
	int capiticy;
}tongxunlu;
void addcontract(tongxunlu*);
void showcontract(tongxunlu*);
void delecontract(tongxunlu*);
void modcontract(tongxunlu*);
void sortcontract(tongxunlu*);
int compare1(const void*, const void*);
int compare2(const void*, const void*);
int checkcapactiy(tongxunlu*);
void chushihua(tongxunlu*);
void shifang(tongxunlu*);
